import unittest
from Student import Student
class TestStudent(unittest.TestCase):
    def setUp(self):
        print('setUp')
        super().setUp()
    def tearDown(self):
        print('tearDown')
        super().tearDown()

    def test_80_100(self):
        s1=Student('',80)
        s2=Student('',100)
        self.assertEqual(s1.get_grade(),'A')
        self.assertEqual(s2.get_grade(),'A')

    def test_60_80(self):
        s1=Student('',60)
        s2=Student('',79)
        self.assertEqual(s1.get_grade(),'B')
        self.assertEqual(s2.get_grade(),'B')

        
    def test_0_60(self):
        s1=Student('',0)
        s2=Student('',59)
        self.assertEqual(s1.get_grade(),'C')
        self.assertEqual(s2.get_grade(),'C')
    def test_invalid(self):
        s1=Student('',-1)
        s2=Student('',101)
        with self.assertRaises(ValueError):
            s1.get_grade()
        with self.assertRaises(ValueError):
            s2.get_grade()
if __name__=='__main__':
    unittest.main()

